﻿@model Irandeb4.Models.Product

@{
    ViewBag.Title = "Edit";
}

<h2>Modificar</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
     @Html.HiddenFor(model => model.ProductId)
    <center><h3 style="color:Red">@ViewBag.MessageError</h3></center>
    <fieldset>
        <legend>Product</legend>
        <table>
            <tr>
                
                <td class="editor-label">
                    @Html.LabelFor(model => model.Name, "Nombre")
                </td>
                <td class="editor-field">
                    @Html.EditorFor(model => model.Name)
                    @Html.ValidationMessageFor(model => model.Name)
                </td>
            </tr>
            <tr>

                <td class="editor-label">
                    @Html.LabelFor(model => model.Type, "Tipo")
                </td>
                <td class="editor-field">
                    @Html.EditorFor(model => model.Type)
                    @Html.ValidationMessageFor(model => model.Type)
                </td>
            </tr>
            <tr>
                <td class="editor-label">
                    @Html.LabelFor(model => model.Description, "Descripción")
                </td>
                <td class="editor-field">
                    @Html.EditorFor(model => model.Description)
                    @Html.ValidationMessageFor(model => model.Description)
                </td>
            </tr>
        </table>

        <p>
            <input type="submit" value="Guardar" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Volver a la lista", "Search")
</div>
